package com.example.myproject.controller;

import com.example.myproject.domain.Student;
import com.example.myproject.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class StudentController {

    @Autowired
    private StudentService studentService;

    @GetMapping("/student")
    public Student getStudent() {
        return studentService.getStudent();
    }
}